package com.king01.dao;

import com.king01.entity.Branch_goods;
import com.king01.entity.Outlibrary_goods;
import com.king01.entity.Outlibrarytransfer_goods;
import com.king01.entity.Staff;
import com.king01.vo.*;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @author ：lqs
 * @date ：Created in 2023/10/2 11:02
 * @description：
 * @modified By：
 * @version:
 */
public interface OutlibraryDao {
    //出库审核数据
     public List<OutlibraryVo> selectAll(Integer branchid);
     //添加出库审核的数据
    public Integer addOutlibrary(@Param("staff")Staff staff, @Param("outtime") Date outtime,@Param("outmethod") Integer outmethod);
    public Integer lsaddOutlibrary(@Param("staff")Staff staff, @Param("outtime") Date outtime,@Param("outmethod") Integer outmethod);

    //获取表outlibrary最大的cid
    public Integer maxId();
    //添加数据到outlibrary-goods表
    public Integer addOutlibraryGoods(@Param("outlibraryVo2")OutlibraryVo2 outlibraryVo2,@Param("cid") Integer cid,@Param("total") Integer total );

    //批量插入到outlibrary-goods表
    public Integer addOutlibraryGoodspl(@Param("list")List<OutlibraryVo2> list,@Param("cid") Integer cid);
    //根据cid查询出出库的商品
    public List<Outlibrary_goods> selectOutByCid(Integer cid);

    //获取当前店铺库存表的数据
    public List<Branch_goods> selectBgByBranchid(Integer branchid);
    //修改通过后的数据
    public Integer updateSuccess(@Param("branch_goods")Branch_goods branch_goods);
    //通过时修改outlibrary表的状态和时间
    public Integer updateoutlibrary(@Param("examtime") Date examtime,@Param("cid") Integer cid,@Param("examstaffid") Integer examstaffid);
    public Integer updateoutlibrary3(@Param("examtime") Date examtime,@Param("cid") Integer cid,@Param("examstaffid") Integer examstaffid);

    //驳回时修改outlibrary表的状态和时间
    public Integer updateoutlibrary2(@Param("examtime") Date examtime,@Param("cid") Integer cid,@Param("remarks")String remarks,@Param("examstaffid") Integer examstaffid);
    public Integer updateoutlibrary4(@Param("examtime") Date examtime,@Param("cid") Integer cid,@Param("remarks")String remarks,@Param("examstaffid") Integer examstaffid);
    //出库审核详细操作
    public List<OutlibraryVo2> find(@Param("cid") Integer cid);
    //出库信息主表
    public List<OutlibraryVo2> selectAll2(Integer branchid);

    //平调审核主表数据
    public List<TransferExMainVo> selectAll3(Integer branchid);
    //平调审核详细信息
    public List<OutlibraryVo2> find2(@Param("cid") Integer cid);
    //平调出库按钮 添加数据
    public Integer add2(@Param("outstaffid")Integer outstaffid,@Param("outtime")Date outtime,@Param("branchid")Integer branchid,@Param("newbranchid")Integer newbranchid);
    //获取最大cid
    public Integer maxId2();
    //添加数据到outlibrarytransfer_goods中
    public Integer addByOg(Outlibrary_goods outlibrary_goods);

    public List<Outlibrarytransfer_goods> selectOutByCid2(Integer cid);

    public List<StatisticsVo> selectMain(@Param("branchid") Integer branchid);

    public Integer updateBranch_goods(OutlibraryVo2 outlibraryVo2);

    public List<Branch_goods> selectBranch_goods(OutlibraryVo2 outlibraryVo2);
    //添加商品
    public Integer addDoodsByBranchid(@Param("branchid") Integer branchid,@Param("goodsid")Integer goodsid,@Param("counts")Integer counts);

}

